#include "cpu/exec/template-start.h"
 
#define instr lods
 
make_helper(concat(lods_,SUFFIX)){
    REG(R_EAX) = MEM_R(cpu.esi); 
    if(cpu.eflags.DF){
        cpu.esi -=DATA_BYTE;
    }
    else{
        cpu.esi +=DATA_BYTE;
    }
 
    print_asm("lods" str(SUFFIX) " %%ds:(%%esi),%%%s", REG_NAME(R_EAX));
    return 1;
}
 
#include "cpu/exec/template-end.h"